<div class="categories index">
    <h2><?php echo __('Categories'); ?></h2>
    <table cellpadding="0" cellspacing="0">
        <thead>
            <tr>
                <th><?php echo $this->Html->link(__('Name'), array('action' => 'sortByName')); ?></th>
                <th class="actions"><?php echo __('Actions'); ?></th>
            </tr>
        </thead>
        <tbody>
            <?php foreach ($categories as $id => $name): ?>
                <tr>
                    <td><?php echo $this->Html->link(h($name), array('action' => 'view', $id)); ?>&nbsp;</td>
                    <td class="actions">
                        <?php echo $this->Html->link(__('View'), array('action' => 'view', $id)); ?>
                        <?php echo $this->Html->link(__('Edit'), array('action' => 'edit', $id)); ?>
                        <?php echo $this->Form->postLink(__('Delete'), array('action' => 'delete', $id), array(), __('Are you sure you want to delete %s (#%s)?', $name, $id)); ?>
                    </td>
                </tr>
            <?php endforeach; ?>
        </tbody>
    </table>
</div>
<div class="actions">
    <h3><?php echo __('Actions'); ?></h3>
    <ul>
        <li><?php echo $this->Html->link(__('New Category'), array('action' => 'add')); ?></li>
        <li><?php echo $this->Html->link(__('List Products'), array('controller' => 'products', 'action' => 'index')); ?> </li>
        <li><?php echo $this->Html->link(__('New Product'), array('controller' => 'products', 'action' => 'add')); ?> </li>
    </ul>
</div>
